package com.freemyleft.left.left_app.mian.index.my.accept_setup.address_managerment;

import com.freemyleft.left.left_app.R;
import com.freemyleft.left.zapp.ui.recycler.MultipleItemEntity;
import com.freemyleft.left.zapp.ui.recycler.MultipleRecyclerAdapter;
import com.freemyleft.left.zapp.ui.recycler.MultipleViewHolder;

import java.util.List;

public class AddressManagementAdapter extends MultipleRecyclerAdapter {
    public static final int ADDRESS_TYPE = 1134;

    protected AddressManagementAdapter(List<MultipleItemEntity> data) {
        super(data);
        addItemType(ADDRESS_TYPE, R.layout.item_addressmanager);
    }

    @Override
    protected void convert(MultipleViewHolder holder, MultipleItemEntity entity) {
        super.convert(holder, entity);
        String name=entity.getField(AddressFiles.NAME);
        String location=entity.getField(AddressFiles.LOCATION);
        String phone=entity.getField(AddressFiles.PHONE);
        holder.setText(R.id.tv_name,name);
        holder.setText(R.id.tv_location,location);
        holder.setText(R.id.tv_phone,phone);
    }
    public enum AddressFiles {
        IS_CHEK,
        NAME,
        PHONE,
        LOCATION,
    }
}
